
			<div class="container">  
				<div id="user">
				<div class="page-header" style="position:relative;">
					<h3>Users</h3>
				</div>
                    <div class="row-fluid">
						<div class="span10">
							<ul class="horizontal">
                            		<?php if($this->tank_auth->is_url('auth/register')){ ?>
										<li><a href="<?php echo site_url('auth/register');?>" class="btn">Add User</a></li>
                                    <?php } ?>
							</ul>
						</div>
					</div>
					<?php
                    if(empty($hasil)){
                        echo "<table class='table table-striped'>
                            <thead>
                                <tr>
                                    <td>Username</td>
                                    <td>Email</td>
                                    <td>Status</td>
                                    <td>Banned</td>
                                    <td>Role</td>
                                </tr>
                            </thead>
                        </table>";
                    }else{
                    ?>
                        <table class='table table-striped'>
                            <thead>
                                <tr>
                                	<td width="1" style="text-align: center;"><input name="checkbox[]" id="checkbox[]" class="chk_boxes" type="checkbox" value="$row -> product_id" /></td>
                                    <td>Username</td>
                                    <td>Email</td>
                                    <td>Status</td>
                                    <td>Banned</td>
                                    <td>Role</td>
                                    <?php if($this->tank_auth->is_url('auth/edit_user') || $this->tank_auth->is_url('auth/delete_user')){ ?>
                                    	<td>Action</td>
                                     <?php } ?>
                                </tr>
                            </thead>
                            <?php foreach ($hasil as $row): ?>
                                <tr>
                                	<td width="1" style="text-align: center;"><input name="checkbox[]" class="chk_boxes1"  id="checkbox[]" type="checkbox" value="$row -> product_id" /></td>
                                    <td><?php echo $row -> username ?></td>
                                    <td><?php echo $row -> email ?></td>
                                    <td><?php if ($row->activated == 1) { ?>
                                          Active
                                          <?php } else { ?>
                                          Non-Active
                                          <?php } ?></td>
                                    <td><?php if ($row->banned == 1) { ?>
                                          Yes
                                          <?php } else { ?>
                                          No
                                          <?php } ?></td>
                                    <td>
                                    	<?php foreach($rol as $r):?> 
                                    		<?php if($row-> role_id == $r->id)
										 		echo $r -> role; ?>
                                        <?php endforeach ?>
                                    </td>
                                    	<?php if($this->tank_auth->is_url('auth/edit_user')){ ?>
											<td><?php echo anchor('auth/edit_user/'.$row->id, '<i class="icon-edit"></i>', 'title = "Edit"') ;?>
                                     	<?php } ?>
                                        <?php if($this->tank_auth->is_url('auth/delete_user')){ ?>
                                    		<?php echo anchor('auth/delete_user/'.$row->id, '<i class="icon-trash"></i>', 'title = "Delete" onclick="return confirmDelete();"'); ?></td>
                                        <?php } ?>         
                                </tr>
                            <?php endforeach; ?> 
                        </table>
                    <?php
                    }
                    ?>
                    <center>
                      <?php echo $pagination; ?>
                    </center>
				</div>
			</div>
        <script type="text/javascript" language="javascript">
			$(function() {
  				$('.chk_boxes').click(function(){
					var chk = $(this).attr('checked')?true:false;
					$('.chk_boxes1').attr('checked',chk);
				});
			});
		</script> 
		
		